<?php 
include("conexao.php");

$id = $_GET["id"];


	
	$query = "delete from ddd where id_ddd=".$id;
	$res   = mysql_query($query, $conexao);
	
	if($res){
		echo "
		<META HTTP-EQUIV=REFRESH CONTENT='0; URL=cad_ddd.php'>
		<script type=\"text/javascript\">
		alert(\"DDD deletado com sucesso.\");
		</script>
		";
	}
	
	else{
		echo "
		<META HTTP-EQUIV=REFRESH CONTENT='0; URL=cad_ddd.php'>
		<script type=\"text/javascript\">
		alert(\"Erro ao deletar DDD.\");
		</script>
		";
	}
	


?>